#include <iostream>
#include <vector>

using namespace std;

template <typename TypeA>
void display(const vector<TypeA> &vec, ostream &os)
{
    typename vector<TypeA>::const_iterator iter = vec.begin();
    typename vector<TypeA>::const_iterator end_it = vec.end();

    for (; iter != end_it; ++iter)
        os << *iter << " ";
}

int main()
{
    vector<int> vec = {452, 524, 845, 45};
    display(vec, cout);

    return 0;
}